package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 奖项对象 award
 *
 * @author mars
 * @date 2024-04-27
 */

@Data
@ApiModel(value = "奖项对象")
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName("award")
public class Award{

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Integer id;
    /**
     * 活动id
     */
    @Excel(name = "活动id")
    @ApiModelProperty(value = "活动id")
    private Integer activityId;
    /**
     * 奖项名称
     */
    @Excel(name = "活动名称")
    @ApiModelProperty(value = "活动名称")
    private String name;
    /**
     * 奖项人数
     */
    @Excel(name = "奖项人数")
    @ApiModelProperty(value = "奖项人数")
    private Integer count;
    /**
     * 奖品
     */
    @Excel(name = "奖品")
    @ApiModelProperty(value = "奖品")
    private String award;
    /**
     * 图片地址
     */
    @Excel(name = "图片地址")
    @ApiModelProperty(value = "图片地址")
    private String fileUrl;

    @TableField(exist = false)
    private int remainCount;

    @Excel(name = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
